<div class="scrollbox">
  <table>
    <thead>
      <tr>
        <th class="commod-name">商品名</th>
        <th class="commod-class">分类</th>
        <th class="commod-type">商品类型</th>
        <th class="commod-stock">库存</th>
        <th class="commod-sale">销量</th>
        <th class="commod-state">状态</th>
        <th class="curl-operation">操作</th>
      </tr>
    </thead>
    <tbody>
      <% @goods.each do |good| %>
        <tr>
          <td><%= good.name %></td>
          <td><%= good.good_type %></td>
          <td><%= good.good_info %></td>
          <td>
            <% if good.stock %>
              <%= good.stock %>
            <% else %>
              -
            <% end %>
          </td>
          <td><%= good.sale_amount %></td>
          <td><%= good.good_status %></td>
          <td class="curl-operation">
            <span>[</span>
            <em><%= link_to '查看详情', admin_good_path(good) %></em>
            <span>]</span>
            <span>[</span>
            <em><%= link_to '交易记录', record_admin_good_path(good) %></em>
            <span>]</span>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <div class="apple_pagination" id="will_page">
    <%= will_paginate @goods, :container => false %>
  </div>
</div>
